package cn.net.ait.hr.action;

import org.guiceside.web.action.BaseAction;
import org.guiceside.web.annotation.*;
import cn.net.ait.hr.entity.HrOrganization;
import cn.net.ait.hr.service.HrOrganizationService;

import java.util.List;
import java.util.ArrayList;

import com.google.inject.Inject;

/**
 * Created by IntelliJ IDEA.
 * User: zhenjia
 * Date: 2009-3-28
 * Time: 12:53:58
 * To change this template use File | Settings | File Templates.
 */
@Action(name = "org",namespace = "/hr")
public class HrOrganizationAction extends BaseAction{

    @ReqSet
    private HrOrganization hrOrganization;

    @ReqSet
    private List<HrOrganization> hrOrganizationList;


    @Inject
    private HrOrganizationService hrOrganizationService;
    
    @PageFlow(result = {@Result(name = "success",path = "/test.ftl",type = Dispatcher.FreeMarker )})
    public String execute() throws Exception {
        hrOrganizationService.test();
        System.out.println(getParameter("aa"));
         System.out.println(getRequestData().getString("bb"));
        hrOrganization=new HrOrganization();
        hrOrganization.setOrgNameZh("ait");
        //hrOrganizationList=new ArrayList<HrOrganization>() ;
//        hrOrganizationList.add(hrOrganization);
        return "success"; 
    }
}
